﻿#include "FITKLoadPowerSourcesSEABeam.h"
#include "FITKAcousticsAbstractSpectra.h"
#include "FITK_Kernel/FITKCore/FITKDataRepo.h"

namespace Acoustics
{
    FITKLoadPowerSourcesSEABeam::FITKLoadPowerSourcesSEABeam()
    {
        //构造
    }

    FITKLoadPowerSourcesSEABeam::~FITKLoadPowerSourcesSEABeam()
    {
        //析构
    }

    FITKAcousticsAbstractLoad::AcousticsLoadType FITKLoadPowerSourcesSEABeam::getAcousticsLoadType()
    {
        return FITKAcousticsAbstractLoad::AcousticsLoadType::PowerSEABeam;
    }

    bool FITKLoadPowerSourcesSEABeam::copy(FITKAbstractDataObject* obj)
    {
        //拷贝数据
        FITKLoadPowerSourcesSEABeam* oldObj = dynamic_cast<FITKLoadPowerSourcesSEABeam*>(obj);
        if (!oldObj) return false;
        _enabledState = oldObj->_enabledState;
        _notes = oldObj->_notes;
        _connectObjID = oldObj->_connectObjID;
        _flexureXSpectraID = oldObj->_flexureXSpectraID;
        _flexureYSpectraID = oldObj->_flexureYSpectraID;
        _extensionZSpectraID = oldObj->_extensionZSpectraID;
        _torsionZZSpectraID = oldObj->_torsionZZSpectraID;
        this->Core::FITKAbstractNDataObject::copy(obj);
        return true;
    }


    int FITKLoadPowerSourcesSEABeam::getFlexureXSpectraID()
    {
        //获取弯曲波X频谱ID
        return _flexureXSpectraID;
    }

    FITKAcousticsAbstractSpectra * FITKLoadPowerSourcesSEABeam::getFlexureXSpectra()
    {
        //获取弯曲波X频谱
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_flexureXSpectraID);
    }

    void FITKLoadPowerSourcesSEABeam::setFlexureXSpectraID(int id)
    {
        //设置弯曲波X频谱ID
        _flexureXSpectraID = id;
    }

    int FITKLoadPowerSourcesSEABeam::getFlexureYSpectraID()
    {
        //获取弯曲波Y频谱ID
        return _flexureYSpectraID;
    }

    FITKAcousticsAbstractSpectra * FITKLoadPowerSourcesSEABeam::getFlexureYSpectra()
    {
        //获取弯曲波Y频谱
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_flexureYSpectraID);
    }

    void FITKLoadPowerSourcesSEABeam::setFlexureYSpectraID(int id)
    {
        //设置弯曲波Y频谱ID
        _flexureYSpectraID = id;
    }

    int FITKLoadPowerSourcesSEABeam::getExtensionZSpectraID()
    {
        //获取拉伸波Z频谱ID
        return _extensionZSpectraID;
    }

    FITKAcousticsAbstractSpectra * FITKLoadPowerSourcesSEABeam::getExtensionZSpectra()
    {
        //获取拉伸波Z频谱
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_extensionZSpectraID);
    }

    void FITKLoadPowerSourcesSEABeam::setExtensionZSpectraID(int id)
    {
        //设置伸波Z频谱ID
        _extensionZSpectraID = id;
    }

    int FITKLoadPowerSourcesSEABeam::getTorsionZZSpectraID()
    {
        //获取扭转波ZZ频谱ID
        return _torsionZZSpectraID;
    }

    FITKAcousticsAbstractSpectra * FITKLoadPowerSourcesSEABeam::getTorsionZZSpectra()
    {
        //获取扭转波ZZ频谱
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_torsionZZSpectraID);
    }

    void FITKLoadPowerSourcesSEABeam::setTorsionZZSpectraID(int id)
    {
        //设置扭转波ZZ频谱ID
        _torsionZZSpectraID = id;
    }
}